Attribute VB_Name = "GlobalConstants" '''''''''''''''' ' GenericConstants.bas ' ' Routines used to control DOS applications ' ' 03-16-99 Robert Clemenzi ' '''''''''''''''' ' ' Define some global constants ' '''''''''''''''' Option Explicit 'Kernel32.dll Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Global ESC$ ' Defined as vbKeyEscape Chr$(27) in Init_Variables() Global cr$ ' Defined as vbKeyReturn Chr$(13) in Init_Constants() Global lf$ ' Defined as Chr$(10) in Init_Constants() Global crlf$ ' Defined as CR$ & LF$ in Init_Constants() ' ' The following will not work - Great language! 'Global Const ESC$ = Chr$(vbKeyEscape) ' Chr$(27) 'Global Const cr$ = Chr$(vbKeyReturn) ' Chr$(13) 'Global Const lf$ = Chr$(10) ' No defined constant 'Global Const crlf$ = cr$ & lf$ ' ' ' While not documented as a part of the VB help file ... ' the following constants may work. ' They are defined as part of the VB Scripting Edition ' vbCr vbLf vbCrLf vbFormFeed vbTab vbNullChar ' This oxymoron is required because there is no way to ' build string constants for these codes Sub Init_Constants() ESC$ = Chr$(vbKeyEscape) ' Chr$(27) cr$ = Chr$(vbKeyReturn) ' Chr$(13) lf$ = Chr$(10) ' No defined constant crlf$ = cr$ & lf$ ' End Sub